﻿using System;
using System.ComponentModel;
using VitCode.ObjectResolutionHelper;

namespace Demo.History.Entities
{
    public class HisVersionInfo
    {
        protected DateTime m_CreateDate;
        protected int m_Id;
        protected string m_Memo;
        protected Guid m_OperatorUserId;
        protected Guid m_WoInfoId;

        private void AutoSet()
        {
            m_CreateDate = DateTime.Now;
        }

        public HisVersionInfo()
        {
            AutoSet();
        }

        public HisVersionInfo(string strMemo,Guid curUserId,Guid woInfoId)
        {
            AutoSet();
            m_Memo = strMemo;
            m_OperatorUserId = curUserId;
            m_WoInfoId = woInfoId;
        }

        /// <summary>
        /// 数据唯一标识
        /// </summary>
        [OrMemo("数据唯一标识")]
        public virtual int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }

        /// <summary>
        /// 版本描述 
        /// </summary>
        [OrMemo("版本描述")]
        public virtual string Memo
        {
            get { return m_Memo; }
            set { m_Memo = value; }
        }

        /// <summary>
        /// 操作人用户ID
        /// </summary>
        [OrMemo("操作人用户ID")]
        public virtual Guid OperatorUserId
        {
            get { return m_OperatorUserId; }
            set { m_OperatorUserId = value; }
        }

        /// <summary>
        /// 所对应的工单对象ID
        /// </summary>
        [OrMemo("所对应的工单对象ID")]
        public virtual Guid WoInfoId
        {
            get { return m_WoInfoId; }
            set { m_WoInfoId = value; }
        }

        /// <summary>
        /// 生成日期
        /// </summary>
        [OrMemo("生成日期")]
        public virtual DateTime CreateDate
        {
            get { return m_CreateDate; }
            set { m_CreateDate = value; }
        }
    }
}